<?php
/**
 * @version		$Id: default.php 3 2011-12-16 20:19:15Z netix.mail@gmail.com $
 * @package		ALM Hoster
 * @desription	Web hosting and domain menager for resellers
 * @subpackage	Components
 * @copyright	Copyright (C) 2011 ALM Studio. All rights reserved.
 * @author		ALM Studio
 * @email		info@alm-studio.net
 * @link		http://alm-studio.net
 * @license		Commercial
 */
 
defined('_JEXEC') or die('Restricted Access');

JHtml::_('behavior.tooltip');
JHTML::_('script','system/multiselect.js',false,true);
$listOrder	= $this->escape($this->state->get('list.ordering'));
$listDirn	= $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_almhoster&view=coupons'); ?>" method="post" name="adminForm">
<table class="adminlist">
	<thead>
	<tr>
	<th width="5">
		<?php echo JHtml::_('grid.sort',  'Id', 'BillcycleId', $listDirn, $listOrder); ?>
	</th>
	<th width="10">
		<input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" />
	</th>
	<th>
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_BILLING_CYCLE_NAME', 'BillcycleName', $listDirn, $listOrder); ?>
	</th>			
	<th width="10%">
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_BILLING_CYCLE_MONTHS', 'BillcycleMonths', $listDirn, $listOrder); ?>
	</th>
	<th width="7%">
		<?php echo JHtml::_('grid.sort',  'COM_ALMHOSTER_BILLING_CYCLE_STATUS', 'BillcycleActive', $listDirn, $listOrder); ?>
	</th>
	</tr>
</thead>
<tfoot>	
	<tr>
	<td colspan="5">
		<?php echo $this->pagination->getListFooter(); ?></td>
	</tr>		
</tfoot>
<tbody>
	<?php foreach($this->items as $i => $item): 
?>
	<tr class="row<?php echo $i % 2; ?>">
		<td>
			<?php echo $item->BillcycleId; ?>
		</td>
		<td>
			<?php echo JHtml::_('grid.id', $i, $item->BillcycleId); ?>
		</td>
		<td align="left">
		<a href="<?php echo JRoute::_('index.php?option=com_almhoster&task=billingcycle.edit&BillcycleId=' . $item->BillcycleId); ?>">
				<?php echo $item->BillcycleName; ?>
				</a>
		</td>
		<td align="center">
			<?php echo $item->BillcycleMonths; ?>
		</td>
		<td align="center">
			<?php echo JText::_( 'COM_ALMHOSTER_LIST_STATUS_'. $item->BillcycleActive ); ?>
		</td>		
	</tr>
<?php endforeach; ?>
</tbody>
	</table>
	<div>
		<input type="hidden" name="task" value="" />
		<input type="hidden" name="boxchecked" value="0" />
		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
		<?php echo JHtml::_('form.token'); ?>
	</div>
</form>

